package com.tyk.bookstore.back.platform.model.query;


import com.tyk.bookstore.back.common.core.model.constant.ValidConstant;
import com.tyk.bookstore.back.platform.model.enume.CarouselState;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.Data;

/**
 * @author tyk
 * @description 轮播图
 */
@Data
public class CarouselAddQuery {

    @Schema(description = "轮播图路径")
    @NotBlank
    @Size(min = ValidConstant.INTERNAL_PATH_MIN_LENGTH, max = ValidConstant.INTERNAL_PATH_MAX_LENGTH)
    @Pattern(regexp = ValidConstant.PATH_REGEXP)
    private String path;

    @Schema(description = "关联链接")
    @Size(min = ValidConstant.EXTERNAL_PATH_MIN_LENGTH, max = ValidConstant.EXTERNAL_PATH_MAX_LENGTH)
    @Pattern(regexp = ValidConstant.EXTERNAL_PATH_REGEXP)
    private String link;

    @Schema(description = "优先级")
    @NotNull
    @Min(0)
    private Integer priority;

    @Schema(description = "描述")
    @NotBlank
    @Size(min = ValidConstant.DESCRIPTION_MIN_LENGTH, max = ValidConstant.DESCRIPTION_MAX_LENGTH)
    @Pattern(regexp = ValidConstant.CH_EN_TEXT_REGEXP)
    private String description;

    @Schema(description = "状态状态[0禁用,1可用]")
    @NotNull
    private CarouselState state;
}
